ds_grid_multiply_grid_region


描述

With this function you can define an area within a given ds_grid, then take those values and multiply them with those found in a separate region of either the same ds_grid, or another one (which has been previously created). The original region will remain unchanged, while the region that they have been multiplied with will now store the new values for each cell.


语法:

ds_grid_multiply_grid_region(index, source, x1, y1, x2, y2, xpos, ypos);

参数 描述
index 靶栅格的索引
source 源栅格的索引
x1 从源栅格复制的单元格区域的左端位置
y1 从源栅格复制的单元格区域的顶端位置
x2 从源栅格复制的单元格区域的右端位置
y2 从源栅格复制的单元格区域的底端位置
xpos The x position on the destination grid to multiply the source region with.
ypos The y position on the destination grid to multiply the source region with.


返回:

N/A(无返回值)


例如:

ds_grid_multiply_grid_region(mygrid, mygrid, 0, 0, 5, 5, 0, 0)

This would take the region of cells from (0,0) to (5,5) of the ds_grid "mygrid" and multiply them with the cells from position (0,0) of the same ds_grid.